<?xml version="1.0" encoding="UTF-8"?>    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:util="http://java.sun.com/jsf/composite/components/util">

<ui:composition template="/WEB-INF/templates/platTemplate.xhtml">
	<ui:define name="content">
		<script type="text/javascript">
			function executeClickEvent(id){
				viewDataA4jFunc(id);
			}
		</script>
		<script type="text/javascript" src="${facesContext.externalContext.requestContextPath}/resources/javascript/dtree.js"/>
		<script type="text/javascript" src="${facesContext.externalContext.requestContextPath}/resources/javascript/thickbox.js"/>
		<link type="text/css" rel="stylesheet" href="${facesContext.externalContext.requestContextPath}/resources/css/dtree.css"></link>
		<link type="text/css" rel="stylesheet" href="${facesContext.externalContext.requestContextPath}/resources/css/thickbox.css"></link>
		<div class="resource_panel">
		
			<a4j:outputPanel id="toolbarPanel" ajaxRendered="true" layout="block" styleClass="toolbar">
					<div class="tdiv firstdiv">
						<a4j:commandLink action="#{manageAuthorityResourcesPage.preTopResourceCreateAction}" value="" event="click" execute="@this" render="mainManageResourcePanel" styleClass="btns">
							<f:verbatim>
								<span class="btn_l">&nbsp;</span>
								<span class="btn_txt">#{message['resource.top.create.display']}</span>
								<span class="btn_r">&nbsp;</span>
							</f:verbatim>
						</a4j:commandLink>
					</div>
					<div class="line"></div>
					<div class="tdiv">
						<a4j:commandLink styleClass="btns">
							<f:verbatim>
								<span class="btn_l">&nbsp;</span>
								<span class="btn_txt">拒绝订单</span>
								<span class="btn_r">&nbsp;</span>
						</f:verbatim>
						</a4j:commandLink>
					</div>
			</a4j:outputPanel>
			<div class="resource-left">
				<a4j:region selfRendered="true" regionRenderOnly="true">
					<rich:panel id="allResourceTreePanel" styleClass="rf-p-none-border rf-p-resource" headerClass="rf-p-hdr-none-border" bodyClass="rf-p-bnone-border">
		                <rich:tree id="treeie" value="#{manageResourceTree.nodes}" var="node" toggleType="ajax" selectionType="ajax" selectionChangeListener="#{manageResourceTree.selectionChanged }">
		                	<rich:treeNode toggleListener="#{manageResourceTree.processTreeToggle }">
								<a4j:commandLink onclick="executeClickEvent('#{node.id}')"><h:outputText value="#{node.name } "/> </a4j:commandLink>
							</rich:treeNode>
					     </rich:tree>
		            </rich:panel>
		            <a4j:jsFunction name="viewDataA4jFunc" action="#{manageAuthorityResourcesPage.viewAction }" render="mainManageResourcePanel">
		            	 <a4j:param  name="objId"/>
		            </a4j:jsFunction>
	            </a4j:region>
			</div>
			<div class="resource-right-content">
				<div class="resource_right">
		            <h:form id="manageResourceForm">
		            	<a4j:outputPanel id="mainManageResourcePanel" ajaxRendered="true" layout="block">
							<h:panelGrid columns="2" styleClass="normaltable" headerClass="tleft" columnClasses="percent10 tleft,percent90" rendered="#{'VIEW' eq manageAuthorityResourcesPage.action }">

								<f:facet name="header">
									<h:outputLabel value="#{message['resource.info.display'] }" styleClass="f14 fN"></h:outputLabel>
									[<a4j:commandLink action="#{manageAuthorityResourcesPage.viewToEditAction }" value="#{message['operate.edit.display'] }" event="click" execute="@this" render="mainManageResourcePanel"></a4j:commandLink>]
									[<a4j:commandLink action="#{manageAuthorityResourcesPage.preCreateAction }" value="#{message['operate.add.display'] }" event="click" execute="@this" render="mainManageResourcePanel"><a4j:param  name="objId" value="#{manageAuthorityResourcesPage.view.id }"/></a4j:commandLink>]
								</f:facet>
								
								<h:outputLabel value="#{message['resource.name.display'] }：" styleClass="normallabel"></h:outputLabel>
								<h:outputText value="#{manageAuthorityResourcesPage.view.name }" styleClass="normal_output_text"></h:outputText>
								<h:outputLabel value="#{message['resource.url.display'] }：" styleClass="normallabel"></h:outputLabel>
								<h:outputText value="#{manageAuthorityResourcesPage.view.url }" styleClass="normal_output_text"></h:outputText>
								<h:outputLabel value="#{message['resource.type.display'] }：" styleClass="normallabel"></h:outputLabel>
								<util:authorityResourcesTypeLabel type="#{manageAuthorityResourcesPage.view.type }" style="" styleClass="normal_output_text"></util:authorityResourcesTypeLabel>
								<h:outputLabel value="#{message['resource.label.display'] }：" styleClass="normallabel"></h:outputLabel>
								<h:outputText value="#{manageAuthorityResourcesPage.view.label }" styleClass="normal_output_text"></h:outputText>
								<h:outputLabel value="#{message['resource.remark.display'] }：" styleClass="normallabel"></h:outputLabel>
								<h:outputText value="#{manageAuthorityResourcesPage.view.remark }" styleClass="normal_output_text"></h:outputText>
								<h:outputLabel value="#{message['resource.sort.display'] }：" styleClass="normallabel"></h:outputLabel>
								<h:outputText value="#{manageAuthorityResourcesPage.view.sort }" styleClass="normal_output_text"></h:outputText>
							</h:panelGrid>
							
							<h:panelGrid columns="2" styleClass="normaltable" headerClass="tleft" footerClass="tcenter" columnClasses="percent10 tleft,percent90" rendered="#{('EDIT' eq manageAuthorityResourcesPage.action) or ('NEW' eq manageAuthorityResourcesPage.action) }">
								
								<f:facet name="header">
									<h:outputLabel value="#{message['resource.info.display'] }" styleClass="f14 fN"></h:outputLabel>
								</f:facet>
								
								<h:outputLabel value="#{message['resource.name.display'] }：" styleClass="normallabel"></h:outputLabel>
								<h:inputText value="#{manageAuthorityResourcesPage.edit.name }" styleClass="normal_input_text w150"><f:ajax event="blur" execute="@this" render="@this"></f:ajax></h:inputText>
								<h:outputLabel value="#{message['resource.url.display'] }：" styleClass="normallabel"></h:outputLabel>
								<h:inputText value="#{manageAuthorityResourcesPage.edit.url }" styleClass="normal_input_text w300"><f:ajax event="blur" execute="@this" render="@this"></f:ajax></h:inputText>
								<h:outputLabel value="#{message['resource.type.display'] }：" styleClass="normallabel"></h:outputLabel>
								<h:panelGroup>
									<h:selectOneMenu value="#{manageAuthorityResourcesPage.edit.type }" styleClass="commonSelectBox" style="font-size:12px">
										<f:selectItems value="#{existAuthorityResourcesType.typeItems}"></f:selectItems>
										<f:ajax event="change" execute="@this" render="@this"></f:ajax>
									</h:selectOneMenu>
								</h:panelGroup>
								<h:outputLabel value="#{message['resource.label.display'] }：" styleClass="normallabel"></h:outputLabel>
								<h:inputText value="#{manageAuthorityResourcesPage.edit.label }" styleClass="normal_input_text w150"><f:ajax event="blur" execute="@this" render="@this"></f:ajax></h:inputText>
								<h:outputLabel value="#{message['resource.remark.display'] }：" styleClass="normallabel"></h:outputLabel>
								<h:inputText value="#{manageAuthorityResourcesPage.edit.remark }" styleClass="normal_input_text w150"><f:ajax event="blur" execute="@this" render="@this"></f:ajax></h:inputText>
								<h:outputLabel value="#{message['resource.sort.display'] }：" styleClass="normallabel"></h:outputLabel>
								<h:inputText value="#{manageAuthorityResourcesPage.edit.sort }" styleClass="normal_input_text w50"><f:ajax event="blur" execute="@this" render="@this"></f:ajax></h:inputText>
								<h:outputLabel value=""></h:outputLabel>
								<h:panelGroup>
									<a4j:commandLink action="#{manageAuthorityResourcesPage.updateAction}" value="" event="click" execute="@this" oncomplete="javascript:refreshPageAction();"  rendered="#{'EDIT' eq manageAuthorityResourcesPage.action }" styleClass="btn"><f:verbatim><span>#{message['button.update.display'] }</span></f:verbatim></a4j:commandLink>
									<a4j:commandLink action="#{manageAuthorityResourcesPage.saveAction}" value="" event="click" execute="@this" oncomplete="javascript:refreshPageAction();"  rendered="#{'NEW' eq manageAuthorityResourcesPage.action }" styleClass="btn"><f:verbatim><span>#{message['button.save.display'] }</span></f:verbatim></a4j:commandLink>
								</h:panelGroup>
							</h:panelGrid>
							<a4j:jsFunction name="refreshPageAction" action="#{manageAuthorityResourcesPage.refreshPageAction }" render="mainManageResourcePanel allResourceTreePanel"></a4j:jsFunction>
						</a4j:outputPanel>
		            </h:form>
	            </div>
            </div>
           	<div class="clear"></div>
        </div>
	</ui:define>
</ui:composition>
</html>

